class PackageModel {

    static getInstance() {
        if (!PackageModel.instance) {
            PackageModel.instance = new PackageModel();
        }
        return PackageModel.instance;
    }

    create(opts) {
        opts = opts || {};
        let data = {
            size: opts.size || 40,
            packageType: opts.packageType || 1, //包裹类型
            items: opts.items || new Array(opts.size || 40), //背包数组 [itemComponent1,itemComponent2,....]
            itemsById: {}, //物品列表集合，键为itemId=>[itemComponent1,itemComponent2]
            emptySize: opts.size || 40,
            bloodbottle: opts.bloodbottle,
        }
        return data
    }

}

export default PackageModel.getInstance();